package com.rms.service.impl;

import java.util.List;

import com.rms.domain.Admin;
import com.rms.domain.Company;
import com.rms.domain.CompanyManager;
import com.rms.domain.Hr;
import com.rms.domain.Worker;
import com.rms.service.AdminService;
import com.rms.utils.service.BaseService;

public class AdminServiceImpl extends BaseService implements AdminService {

	
	@Override
	public List<CompanyManager> findAllCompanyManager() throws Exception {
		return companyManagerDao.query();
	}

	@Override
	public void deleteCompanyManager(int manager_id) throws Exception {
		companyManagerDao.delete(manager_id);
		
	}


	@Override
	public void deleteHrById(int hr_id) throws Exception {
		hrDao.delete(hr_id);
	}


	@Override
	public void deleteWorkerById(int worker_id) throws Exception {
		workerDao.delete(worker_id);
		
	}

	@Override
	public void deleteCompany(int company_id) {
		companyDao.delete(company_id);
	}

	@Override
	public List<Company> getAllCompany() {
		// TODO Auto-generated method stub
//		System.out.println(companyDao.query());
		return companyDao.query();
	}

	@Override
	public List<Hr> getAllHRs() {
		// TODO Auto-generated method stub
		return hrDao.query();
	}

	@Override
	public List<Worker> getAllWorkers() {
		// TODO Auto-generated method stub
		return workerDao.query();
	}

//	@Override
//	public Admin login(Admin admin, Class<Admin> class1) throws Exception {
//		return (Admin) super.login(admin, class1);
//	}

}
